<template>
	<view class="boxs" v-if="preview" @touchmove.stop.prevent="" @click.stop="close">
		<view class="video" @click.stop="">
			<video :src="urls" autoplay='true' controls></video>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				preview:false,
				urls:''
			};
		},
		methods:{
			open(url){
				this.preview=true
				this.urls=url
			},
			close(){
				this.preview=false
				this.url=''
			},
		}
	}
</script>

<style lang="less" scoped>
	.boxs{
		width: 750rpx;
		height: 100vh;
		background-color: #333;
		position: fixed;
		top: 0;
		z-index: 1000;
	}
	.video{
		width: 100%;
		position: absolute;
		top: 50%;
		left: 0;
		transform: translateY(-50%);
		video{
			width: 100%;
		}
	}
</style>